/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package main.KBProcess;

import java.io.Serializable;
import main.Ontology.ElementOntologySet;

/**
 *
 * @author Isaac Osesina
 */
public interface Element extends Cloneable, Serializable {

    public static String CONTEXT = "Context";
    static enum ElementType{CONTEXT, ENTITY, FILLER};

    /**
     * Returns type of element
     * @return ElementType : CONTEXT or ENTITY
     */
    ElementType getType();

    /**
     * Returns sting content of element.
     * @return entityValue if ElementType=ENTITY or contextValue if ElementType=CONTEXT
     */
    String getValue();

    /**
     * Returns the index of this element within document
     * @return the index of element within document
     */
    int getIndexOf();

    /**
     * Return the Label (Type name) of element
     * @return Element.Context if ElementType=CONTEXT otherwise element tag e.g. Name, Date
     */
    String getLabel();

    /**
     * Returns the id number of the Label. Id is obtained from the document ontology
     * @return id number of the Label
     */
    int getLabelIndex();

    /**
     * Returns the document id where this element originated
     * @return document id where this element originated
     */
    int getDocID();

    /**
     * Sets ElementType
     * @param type ElementType : CONTEXT or ENTITY
     */
    void setType(ElementType type);

    /**
     * Sets sting content of element.
     * @param value of element
     */
    void setValue(String elementValue);

    /**
     * Sets the index of this element within document
     * @param the index of element within document
     */
    void setIndexOf(int indexOf);

    /**
     * Sets the Label (Type name) of element
     * @param Element.Context if ElementType=CONTEXT otherwise element tag e.g. Name, Date
     */
    void setLabel(String label);

    /**
     * Sets the id number of the Label. Id is obtained from the document ontology
     * @param id number of the Label
     */
    void setLabelIndex(int labelIndex);

    void setDocumentLanguage(String language);

    String getDocumentLanguage();

    void setDocumentCategory(String docType);

    String getDocumentCategory();

    int getSequenceInDoc();

    void setSequenceInDoc(int sequenceInDoc);
    
    ElementOntologySet getOntologies();

    /**
     * Returns the document id where this element originated
     * @param document id where this element originated
     */
    void setDocID(int docID);
    
    Element getPreElement();
    
    void setPreElement(Element element);
    
    Element getPostElement();
    
    void setPostElement(Element element);
    
    /**
     * Returns the KnowledgeBaseDocument to which element belongs
     * @return KnowledgeBaseDocument to which elementBelongs
     */
    KnowledgeBaseDocument getKnowledgeBaseDocument();
    
    /**
     * Sets the KnowledgeBaseDocument to which element belongs
     * @param kbDocument KnowledgeBaseDocument to which element belongs
     */
    void setKnowledgeBaseDocument(KnowledgeBaseDocument kbDocument);

    @Override
    String toString();
}
